﻿using Refit;
using ZhaoXi.MSACommerce.AuthService.Service;
using ZhaoXi.MSACommerce.CommonServiceClient;
using ZhaoXi.MSACommerce.CommonServiceClient.AspNetCore;
using ZhaoXi.MSACommerce.Consul.ServiceDiscovery;

namespace ZhaoXi.MSACommerce.AuthService.Clients
{
    public class UserServiceClient(
        IServiceDiscovery serviceDiscovery,
        ILoadBalancer<UserServiceClient> loadBalancer,
        HttpClient httpClient)
        : ServiceClient(serviceDiscovery, loadBalancer, httpClient)
    {
        public override string ServiceName { get; set; } = "ZhaoXi.MSACommerce.UserService.HttpApi";
        public readonly IUserService UserServiceApi = RestService.For<IUserService>(httpClient);
    }
}
